home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / MacPerl 5.1.3 / Mac_Perl_513_src / MacPerl5 / MPUtils.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-17  |  2.6 KB  |  110 lines  |  [TEXT/MPS ]

  1. /*********************************************************************
  2. Project    :    MacPerl            -    Real Perl Application
  3. File        :    MPUtils.h    -
  4. Author    :    Matthias Neeracher
  5.  
  6. A lot of this code is borrowed from 7Edit written by
  7. Apple Developer Support UK
  8.  
  9. Language    :    MPW C
  10.  
  11. $Log: MPUtils.h,v $
  12. Revision 1.1  1994/02/27  23:04:38  neeri
  13. Initial revision
  14.  
  15. Revision 0.4  1993/09/28  00:00:00  neeri
  16. PlotResMiniIcon
  17.  
  18. Revision 0.3  1993/08/17  00:00:00  neeri
  19. DoPrefsDialog
  20.  
  21. Revision 0.2  1993/08/14  00:00:00  neeri
  22. OpenPreferences
  23.  
  24. Revision 0.1  1993/05/29  00:00:00  neeri
  25. Compiles correctly
  26.  
  27. *********************************************************************/
  28.  
  29. #ifndef __MPUTILS__
  30. #define __MPUTILS__
  31.  
  32. #include <Types.h>
  33. #include <QuickDraw.h>
  34. #include <Packages.h>
  35. #include <GestaltEqu.h>
  36. #ifdef EVIL_USELESS_EDITIONS
  37. #include <Editions.h>
  38. #endif
  39. #include <Printing.h>
  40.  
  41. #ifndef __MPGLOBALS__
  42. #include "MPGlobals.h"
  43. #endif
  44.  
  45. pascal Boolean CheckEnvironment();
  46.  
  47. pascal void ShowError(Str255 theError,
  48.                       long   theErrorCode);
  49.  
  50. pascal Boolean FeatureIsImplemented(OSType theFeature,
  51.                                     short  theTestBit);
  52.  
  53. pascal void GetTempFSSpec(DPtr aDoc, FSSpec * temp);
  54.  
  55. pascal Boolean Ours(WindowPtr aWindow);
  56.  
  57. pascal void SetShortMenus();
  58.  
  59. pascal void SetLongMenus();
  60.  
  61. pascal void SetEditMenu(DPtr theDoc);
  62.  
  63. pascal void AdornDefaultButton(DialogPtr theDialog, short theItem);
  64.  
  65. #if defined(powerc) || defined(__powerc)
  66. extern RoutineDescriptor uDrawDefaultOutline;
  67. extern RoutineDescriptor uSeparator;
  68. #else
  69. pascal void DrawDefaultOutline(DialogPtr theDialog, short theItem);
  70. pascal void Separator(DialogPtr dlg, short item);
  71.  
  72. #define uDrawDefaultOutline *(UserItemUPP)&DrawDefaultOutline
  73. #define uSeparator *(UserItemUPP)&Separator
  74. #endif
  75.  
  76. pascal void RetrieveText(DialogPtr aDialog,
  77.                                                short     anItem,
  78.                                                Str255    aString);
  79.  
  80. pascal void SetText( DialogPtr aDialog,
  81.                                          short     itemNo,
  82.                                          Str255    theString);
  83.  
  84. pascal void GetRectOfDialogItem(DialogPtr theDialog, short theItem, Rect *theRect);
  85.  
  86. #define LesserOf(A,B)    ((A<B) ? A : B)
  87. #define GreaterOf(A,B)    ((A>B) ? A : B)
  88.  
  89. pascal Boolean DoPageSetup(DPtr theDoc);
  90.  
  91. pascal Boolean CtrlKeyPressed(const EventRecord *theEvent);
  92.  
  93. pascal Boolean OptionKeyPressed(const EventRecord *theEvent);
  94.  
  95. pascal void DoAbout(Boolean easter);
  96.  
  97. pascal void RegisterDocument(DPtr doc);
  98.  
  99. pascal void UnregisterDocument(DPtr doc);
  100.  
  101. pascal void SetupWindowMenu();
  102.  
  103. pascal void DoSelectWindow(short item);
  104.  
  105. pascal Boolean WeirdChar(const EventRecord * ev, short modifiers, char ch);
  106.  
  107. pascal Boolean SameFSSpec(FSSpec * one, FSSpec * other);
  108.  
  109. #endif
  110.